#include <iostream>

//https://www.nowcoder.com/practice/b0423a89826c4d68a3e8b9832a6a1f49?tpId=225&tqId=38979&sourceUrl=https%3A%2F%2Fwww.nowcoder.com%2Fexam%2Foj

using namespace std;

long long recursion(int n){
    if(n == 1)
        return 1;
    return recursion(n - 1) * n; //递归计算n*f(n-1)
}

int main() {
    int n;
    cin >> n;
    long long factorial = recursion(n); //递归
    cout << factorial << endl;
    return 0;
}



